<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsViceuserTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('viceuser', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->bigInteger('uid')->comment('用户id');
			$table->tinyInteger('type')->nullable()->comment('1为pc端登录否则为手机端');
			$table->string('ip', 15)->nullable()->comment('登录ip');
			$table->integer('last_time')->nullable()->comment('最后登录时间');
			$table->boolean('status')->nullable()->default(false)->comment('登录状态');
			$table->string('model', 100)->nullable()->comment('登录设备型号');
			$table->string('token', 100)->nullable()->comment('登录验证码');
			$table->integer('token_time')->nullable()->comment('token生成时间');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('viceuser');
	}

}
